﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    xmlns:ctrls="clr-namespace:SBPweb.PROvibe.Client.Framework.Controls">

    <Storyboard x:Name="ElementEnter" AutoReverse="False" Duration="0:0:0.3">
        <DoubleAnimation
            Storyboard.TargetProperty="Opacity"
            Duration="0:0:0.3"
            From="0.0"
            To="0.5"
        />
    </Storyboard>

    <Storyboard x:Name="ElementLeave" AutoReverse="False" Duration="0:0:1.0">
        <DoubleAnimation
            Storyboard.TargetProperty="Opacity"
            Duration="0:0:1.0"
            From="0.5"
            To="0.0"
        />
    </Storyboard>
    
    <Style x:Name="NormalButton" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border Name="ButtonBorder" CornerRadius="3" BorderThickness="1" BorderBrush="#FFFFFF">
                        <Grid x:Name="ButtonGrid" MinWidth="15" Cursor="Hand">
                            <Rectangle Fill="#000000" Opacity="0.7" Grid.RowSpan="2" RadiusX="3" RadiusY="3" />
                            <Rectangle x:Name="ButtonRHover" Fill="#FFFFFF" Opacity="0.0" Grid.RowSpan="2" RadiusX="3" RadiusY="3" />
                            <ContentControl Content="{TemplateBinding Content}" Background="Transparent" FontSize="7" Foreground="#FFFFFF" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Name="NormalContainer" TargetType="ctrls:SmartpartContainer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ctrls:SmartpartContainer">
                    <Grid x:Name="SmartpartContainerGrid">
                        <Border Name="SmartpartContainerBorder" CornerRadius="5" BorderThickness="1" BorderBrush="#FFFFFF">
                            <Grid Name="SmartpartContainerContent" Width="Auto">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <Rectangle Fill="#000000" Opacity="0.7" Grid.RowSpan="2" RadiusX="5" RadiusY="5" />
                                <Grid Name="gTitle" Grid.Row="0" Margin="3,3,3,3">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Name="SmartpartContainerTBTitle" TextAlignment="Center" FontWeight="Bold" Foreground="#FFFFFF" Grid.Column="0" Text="..:: {0} ::.." />
                                    <Button Name="SmartpartContainerBClose" Grid.Column="1" Content="x" />
                                </Grid>
                                <Grid Name="SmartpartContainerBody" Grid.Row="1" Margin="3,0,3,3">
                                    <ContentControl Content="{TemplateBinding Content}" />
                                </Grid>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="ctrls:ContextMenu">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ctrls:ContextMenu">
                    <Popup Name="ContextMenuPopup">
                        <Border Name="ContextMenuPopupBorder" CornerRadius="5" BorderThickness="1" BorderBrush="#FFFFFF">
                            <Grid Name="ContextMenuPopupContent" Width="Auto" Cursor="Hand">
                                <Rectangle Fill="#000000" Opacity="0.7" RadiusX="5" RadiusY="5" />
                                <StackPanel MinWidth="160" Margin="3,3,3,3">
                                    <ContentControl Content="{TemplateBinding Content}" />
                                </StackPanel>
                            </Grid>
                        </Border>
                    </Popup>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>